<?php
header('Content-type:text/html;charset=utf-8');

//包含数据库配置
include '../../public/peizhi.php';

//包含函数
include '../../public/func.php';

//调用函数连接数据库
$link = db();

//接值要编辑的板块ID
$bk_id = $_POST['bk_id'];
$bk_name = $_POST['bk_name'];

//准备SQL语句
$sql = "update bankuai set bk_name='{$bk_name}' where bk_id={$bk_id}";

//执行SQL语句
if($res = mysqli_query($link,$sql)){
	echo '<script>alert("修改板块成功");window.location.href="show.php";</script>';
}else{
	echo '<script>alert("修改板块失败");window.location.href="show.php";</script>';
}
	
//关闭数据库连接
mysqli_close($link);


